Fixed user registration and authentication

* A valid email is required to register
* A password must be longer than 5 characters
* Email address must be unique