Added example showing how to login via the constructor.