fix db url, and add a function to check if a user exists or not