Comparing Basicity of Aniline Derivatives

Why is 4-hydroxyaniline more basic than 2-hydroxyaniline? Hydroxyl is an electron donating group, and their resonance structures suggest that they both isolate a negative formal charge on the carbon that is bonded to the amine group (which is also an electron donating group) so it would be more unstable. However, there is a clear difference in basicity between the two, the former having a pKb of approximately 8.53 while the latter has a pKb of 9.28. What accounts for this huge difference?


I also have another question. 3-hydroxyaniline avoids putting the negative formal charge on the carbon that is bonded to the amine group, and it has a pKb of 9.83. This makes sense because that means 3-hydroxyaniline is more stable in terms of resonance and thus its conjugate acid would want to liberate more protons than the other two, rendering 3-hydroxyaniline less basic than the other two. However, aniline has a pKb of 9.37, which means that it is more basic than 3-hydroxyaniline. However, hydroxyaniline has a higher electron density than aniline so shouldn't it be more basic than aniline? 


