Cleaned up login behavior