added checkEmail function and edited setPassword function