minor fixes

minor fixes and updated demo app to accept email address as user name