Login complete, javascript beautified