fixing login/logout for mobile and normal