Implemented Login functionality.