login and logout API methods + documentation