Implemented user authentication. Users should be able to register and sign in. Note that currently a user is not automatically signed in after registration. Need to change this.