Making sure permission is only requested once, adding a logout button