feature #4115 : Using secure cookie if we are in a ssl connection

Using httpOnly cookies for authentication
Cleaning some old jsp code