Login with DB-retrieved users implemented

Look att TC 4.11 for more information. Users that are in the DB can now
login, but no functionality for the keys yet.