Fixed alert boxes and login redirects