Auth & tests

Authenticate the user & add tests