Change registration to check jwt cookie

I changed how javascript checks if a user should be logged in.  You should now use app.isLoggedIn() to get an object that is parsed with the cookie information.  It will return false if the cookie doesn't exist or it's expired.

@tladendo @dvasudevan