User authentication

Add ability for users to log in and log out. Resolves #10 
Why is this defined twice?