User login

I'm not quite ready for this to be reviewed yet (I'll update it tonight), just testing the pull request functionality against the right branches.