db_select_one utility function
user login api, primitive session/login cookies, some security infrastructure