logout fixes for rails 4