Implement auth system part 1
Implement auth system part 2
fix #1 #3 Implement auth system