setting up loggin and authentication.