adding code to close the app when we click the leave button
experimenting with the close feature
removing the need for secret key
some temp changes