Fixed user logged in issue