add errcode specifications
modified logout function
add login and logout handles functions
add basic auth stuff