I think this is wrong
function Binds()
bindKey( "F2", "down", CreateLoginWindow )
addEventHandler("onResourceStart", getRootElement(), Binds)
end
Try
function Binds()
bindKey( "F2", "down", CreateLoginWindow )
end
addEventHandler("onResourceStart", getRootElement(), Binds)