added login functionality as well as fixed funcationality for saved logins