Fix tab behaviour on login page
Fix permission modal
Improve tests