add authentication and login logic