created js to handle user signup