Made loging in working (used the database interface); made it a bit prettier