Sorted out problem with closing the app mid login