Added a login page and added methods to models to make program more DRY