Hi @EleMenk,
there was a similar thread on the forum.
Tutorial on creating API authentication (token based) for Phoenix 1.3?
If you check out the phauxth repo, there is a complete example implementing a email/password authentication.
Also there is an article How to Authenticate your Elixir/Phoenix APIs using Guardian on that topic which might be interesting for you.