Fixed a few errors occurring during registration and login

I left comments with each check in.  Please be easy on me, this is my first github contribution.