implemented sign out function