finally added user registration functionality