Add factory for creating a User

The authentication and authorization system utilizes User objects quite heavily.
Test the ability to log in and log out