Unable to scale up or snapshot an app

Application.find_by_user is broken, add test and correct it.

[merge]