Implemented sign in and out.