add untested function db_query_user and db_query_user_skill in database.php. Enhance user_login function in functions.php