Added basic methods for login/logout handling using cookies.