Some minor fixes. Fixed checking of username & password.