Fix bug on login