Added Login/Logout and Cookie support