Added login functionality and modified models.