Fixing doLogin