Adding checkIfUserExists. Fixing some other stuff