moving the login into its own module