Log in functionality. Introduced AbstractUser class to generify common user operations.