Implment Login/logout functionality