Minor Code Update

Changed login and register class code a little.
Added error codes for login class to better handle errors later on in
error handler class.