Started working on a function to check whether an email exists in the database