added some comment and make login url configurable