Added a check for duplicate usernames/emails.

I also fixed the password verification step.