Changed Code for login using doctrine