Added functionality to create a user and to log in.