Reintroduced sessions to createAccount and API.php