bugfix:devise update broke jnlp session handling

this fixes that problem and adds some tests around so 
perhaps it will keep working in the future