Added proper return detection for user logins