Fix broken registration

and refactor the login method to reject suspended users.