replaced database wrapper, created registration and login methods