T004 authentificate user with db storage

Rearranged