Refactor sign in with services and structure.