issue 1253 - prevent multiple logins with same username

Resolves #1253 
Use doxy-comments in the headers, so that doxygen creates nice documentation for the functions.