finish sign in, sign up, sign out rewrite.