Added basic database support and validation. Checking user exists in PHP does not work at the moment.