updated loginController and added some Comment