Add auth
Code cleanup