refactor model
fix registration page