Fix regex for validating administrator email addresses and an issue with AJAX call detecting database connection

Closes #2.