Batch of fixes + introducing form-based authentication:
 - PL-160
 - PL-168