logout functionality

updated ajaxScript to send  a one off function.
bd_manage got a extra function, and a case as well as updated error
reporting.