fix bug in application helper method, add login and logout links in application layout