small changes - shouldn't change functionality
moved auth stuff to init