implemented login on app delegate