Implemented user registration functionality