Implement sign in/out.