authentications & sign up refactoring