Refactor to reduce duplication and clarify code dealing with user signin or creation via omniauth.