Login functionality added

Login functionality has now been added. Will need tweaking.