fixed the bug where invalid credentials would crash javascript. (erhmmm
price... cough cough) lol jkjk