Wrote Log-in functionality in model. Created login function in controller class to authenticate user.