Finally it worked. Thank you very much. Just two points:
a. Ajaxing ends up with this URL:
http://localhost:4567/map?_=1514797485831&loggedin=true
I mean the internal details are visible to the user. An ideal solution is to reset the URL to something like this: localhost:4567/map
b. Suppose I cold load with an invalid URL:
http://localhost:4567/map?loggedin=FALSE
it still renders the map page. Ideally, it should display the "Page Not found message"
Any solution to these two? Or, shall I consider them as "OK let it behave so!"?