added login, logout functionality