Ported loginReq & a_getLcReq

Also:
-Fixed error() response format
-When a PDO query returned null the script didn't properly detect it.
Hence the $db->getRowCount() workaround.