changed up init

created a method to call in case of good login