Refactor sign in actions.