Not being logged out after session ends

I’m having some issues where my login status doesn’t match my session. It seems that after my session runs out my status remains as logged in and when I input my username and password it actually logs me out (this also happens if I switch browsers and login again using the same credentials). This is definitely something I don’t want our customers experiencing. Is there a something I can do about this?