logout added
application closing corrected