How to create authentication in Phoenix?

Good evening everyone …
I was currently in need of a little help in my study environment …
I made all the necessary settings to run an authentication page …
Everything working perfectly …
I need to add some details …
1 - Password validation when creating a user
2 - Block user only after login
Can you help me?

Github environment of studies:

I’m new to elixir / phoenix, if someone wants to make some correction in my code, I’ll be open to accept the help.

I was able to solve by changing the structure …