Javascript stuff

Popup sign up, popup error, rearranged javascript code