I managed to do my solution 2 by removing these lines in the components.xml:
<event type="org.jboss.seam.security.notLoggedIn">
<action execute="#{redirect.captureCurrentView}"/>
<action execute="#{identity.tryLogin}"/>
</event>
<event type="org.jboss.seam.security.loginSuccessful">
<action execute="#{redirect.returnToCapturedView}"/>
</event>
Now every time session expires and the user tries to login, he is redirected to the homepage. This is enough to fix my logout problem and remove the ArrayIndexOutOfBoundsException
for now unless they want to recover the last page the user has visited.