Added register/login functionality