Login function added.