Tyler's login function added