Fixed editing of profiles and started authorization with Pundit.