Here is my code. 
The GetByuserEmail takes the input email and checks with the database.If exists it returns the email.In checkmail() method the GetByUserEmail method is called and if the email exists then it should have returned true. Please check where might have gone wrong.

```
*public User GetByUserEmail(string email)
        {
            var users = db.Users.Where(u => u.Email == email);
            if (users.Count() > 0)
            {
                return users.First();
            }
            return null;
        }*

In regitster Controller,

*public JsonResult checkEmail(string email)
        {
            Models.User user = userRepository.GetByUserName(email);
            bool exists = (user != null);
            JsonResult result = new JsonResult();
            result.JsonRequestBehavior = JsonRequestBehavior.AllowGet;
            result.Data = new { Exist = exists };
            return result;

        }*

It returns in json format

*{"Exist":false}*

```