refact get_value_from_body to utils.npm
add login function