connected with mongoose; added authentication api