refactored the app file
added password confirmation. App working