Fix bug in login view