moved the sample into different file and enabled refresh of login