Implementing new login and registration methods