added database and made secure u where logged in as teacher