Clarify usage of loginhttp_cookieget
Modify behaviour of http_tokenget to store directly into db
Document the function logindb_userget
Fix the switch statement to correct functions and check