fix #1178 - error when the user doesn't belong to a project

this is the simplest solution but I think we should refactor all this
Can you try also remove this line, that makes that all history of navegation removed?