Added a setup function for login