updated models controller and added authentication system