Added DB persistence for users, apps and accounts

Added in user, account and application into database
Added in session information
TODO: Add attribute to handle user session