With some nasty hacks I managed to check password

I check headers by hand this is nasty and disgusting. It work (bad), I
need to use some java mechanism for authorization