added user registration as well as login/logout functionality