fixed small issues

closing db/cursors, login fixes
Merge branch 'teams' of https://github.com/hakkepakke/sprekigjovik into teams