Improved code style
Fixed auth