Some fixes.

Fixed variable scope error in "main.cpp". Changed return type of
getAuth() in "priv.cpp" to give valid information to tempauth in
"main.cpp".