Implement Login and Logout Features.