Added registration and login functionality