Updated Login to work with new database model