Complete signup/login/logout function