Create login/logout functionality.