midas login and logout fixes