JAVA-7: Better re-auth and authentication