adds logging in for users, closes #36