I can think of several problems with this idea, in direct order of importance (least to most):
1) Your site won't work for those with JS disabled.
2) Your site may not show the in-browser yellow toolbar to notify the user that SSL/HTTPS is enabled. (Depends on implementation).
3) The user_id parameter is not required client side, and probably not a good idea either. Authentication tokens are almost always just a single identifier, and that's all that is required to prove a user is logged in.
4) It's usually bad practice to write your own authentication capabilities. I know you are not replicating the back-end (which is a very bad idea), but most frameworks already automate the front-end authentication for you and do a good job at it. Use those frameworks, cause they have been tested and are secure. Also, a lot of the time the framework will help you (eg. make it easier to switch authentication providers).