modified code for logout and verification authentication