Preliminary pass at login functionality. Probably doesn't work.