Implemented authentication and login