added sign out and auto sign in