Refactor user signup to pgsql function
block registered user and not confirmed user