Began sign-in/out rewrite