Move some commonalities between the login/signup helpers into a separate trait