Refactor authenticate_user! step for use with other models