Add some auth checking and the database field when logging in.