Added login functionality
I can't remember what I did in this commit