Added javascript redirect for login control.