Moved functions around in user/index.jsp