add function to handle user signin and signup remotely