BugFixed for login (if cannot find user, it will return 500 error)