When I boot my computer I can use the bluetooth keyboard to log in, but after login the keys don't seem to work.
As it turns out, the default for ubuntu sessions is numlock on. This adversely affects some cheaper tenkeyless (TKL) keyboards where their firmware wasn't implemented well.
To make the default numlock off so your keyboard works:
sudo apt-get install numlockx
...then go to Startup Applications Preferences and add a new entry: