Login functionality

Request push into master to add login functionality. All tested on local branch.