added load and error alerts for login/register js