Removed redirection from javascript and changed location of incorrect login redirect.