demonstrate login and the way in which msg and err should be handled for each view