Fix redirect after login URL: use absolut url:
Replace window confirm with UI dialog