Implemented user login/logout and registration