logout for shared user

logout for shared user

Hi..

we have application and we shared forms and view with in shared user group. everything works ok with asking their credentials before accessing forms and views to enter data and accessing data report.
But once shared user logged in is there any way we can program / link/button to logout so once they done they can logout.  the reason with that, is shared user logged on and it stay logged on so to access other forms and views (in same application ) which required different id, eventhough they entered right credentials but access denied. it and says you do not have access to it. So i tried and find out that previous users did not loged out so i loged out and try and it works.
so is there any way we can have button/link so once they done they can logout.

i.e 

In forms, once they submit the report, after message display that "successfully entered data" we can add some button says "logout"

in view, we can put button at the top, says logout.

is that possible ?

any idea ?

thanks,