Working logout and expiration time