Working log in page, added methods to controller and model.