Fixed $userName not always being passed as lowercase string and added the
database salt where necessary