create authFactory with login function
moved logout function to authFactory
moved register function to authFactory
moved reset password function to authFactory