Added registration and login/logout functionalities