login methods, db fixes

Added AuthorizationService which handles loggin users in, loggin users
out, get the current logged in user, check if the user is authorized and
registers a user.
Db wrapper uses pdo instead of mysqli. Slight datatype fixes in database