added login inside of init