[update] path function

static path function for server side and client side, user login data
encapsulation