Bug fixes and added get_edittoken function

Fixed issue in request function. logout returned '[]'.
'request' function was raising exception.

Added function get_edittoken function which will be
required for editing pages.