fixing some back button and session issues